<?php require_once 'header.php';?>
        <!-- Page Content -->
        <div id="page-wrapper">
            <div class="container-fluid">
                <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <?php echo XXF_BACK?>
                            数据修改
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <textarea name="content" style="width:100%;height:200px;visibility:hidden;" id="content"><?php echo $result['content']?></textarea>
                            <input type="button" value="修改" onclick="upd(<?php echo $tdsid?>)">
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
             </div>
        </div>
        <!-- DataTables JavaScript -->
<?php require_once 'bottom.php';?>
<script charset="utf-8" src="kindeditor/kindeditor-all.js"></script>
<script>
var editor1;
KindEditor.ready(function(K) {
	editor1 = K.create('textarea[name="content"]', {
		resizeType : 1,
		allowPreviewEmoticons : false,
		items : [
            'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
            'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
            'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
            'superscript', 'clearhtml', 'quickformat', 'selectall', '|',
            'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
            'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
            'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap'
        ]
	});
});
function upd(id){
	editor1.sync();
	$.xtodb("upd","todosub",$("[name='content']"),id,function(data){
		if(data==0){
			$.xloading(0);
			$.xalert("处理失败,检查填写是否正确!");
		}else{
			alert("处理成功！");
			history.go(-1);
		}
	}); 
}
</script>